<?php
namespace app\common\model;

use think\Model;

class ContrastPractice extends Model
{
    // 指定表名,不含前缀
    protected $name = 'contrast_practice';
        public function insertcontrast_practice($args)
    {
        $this->insertAll($args);
        return true;
    }
      public function insertdata($args)
    {
        $this->insert($args);
        return true;
    }

    /**
     * @param array $arg
     * @param string $field
     * @return false|\PDOStatement|string|\think\Collection
     */
    public function getListByArg(array $arg,$field='*')
    {
        return $this->where($arg)->field($field)->select();
    }

    public function getListByArgOne(array $arg,$field='*')
    {
        return $this->where($arg)->field($field)->find();
    }
}
